//
//  UIbarButtonItem+Extension.swift
//  SinaWeibo
//
//  Created by gaoliang on 15/11/19.
//  Copyright © 2015年 gaoliang. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    convenience init(imageName: String) {
        let btn = UIButton(type: .Custom)
        btn.setImage(UIImage(named: imageName), forState:.Normal)
        btn.setImage(UIImage(named: imageName + "_highlighted"), forState: .Highlighted)
        btn.sizeToFit()
        
        self.init(customView:btn)
    }
}
